<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>layout 后台大布局 - Layui</title>
  <link rel="stylesheet" href="../layui/css/layui.css">
  <link rel="stylesheet" href="../css/global.css">
  <link rel="stylesheet" href="../icheck/minimal/red.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">layui 后台布局</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item"><a href="capital.html">用户中心</a></li>
      <li class="layui-nav-item"><a href="../t.html" target="_Blank"a>接单</a></li>
    </ul>
    <ul class="layui-nav layui-layout-right">
     <li class="layui-nav-item" id="yongjin">佣金:</li>
	 <li class="layui-nav-item">
        <a href="javascript:;" id="username">
          <img src="http://t.cn/RCzsdCq" class="layui-nav-img" >
		  欢迎:
        </a>
        <dl class="layui-nav-child">
          <dd><a href="capital.html">基本资料</a></dd>
          <dd><a href="changepassword.html">修改密码</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item"><a href="../login.html">退了</a></li>
    </ul>
  </div>
  
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
        <li class="layui-nav-item"><a href="../index.html">控制台</a></li>
        
        <li class="layui-nav-item layui-nav-itemed">
          <a href="javascript:;">用户管理</a>
          <dl class="layui-nav-child">
            <dd><a class="layui-this" href="capital.html">用户中心</a></dd>
			<dd><a class="layui-this" href="tixian.html">提现</a></dd>
          </dl>
        </li>
        
        <li class="layui-nav-item">
                <a href="javascript:;">种菜区</a>
                <dl class="layui-nav-child">
                    <dd><a href="../t.html" target="_Blank">种菜</a></dd>
					<dd><a href="../foodmenulist/foodmenuList.html">菜谱</a></dd>
					
					
                </dl>
            </li>
        
        
      </ul>
    </div>
  </div>
  
  <div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;">
        <fieldset class="layui-elem-field site-demo-button">
			<legend><big><b id="information">个人信息</b></big></legend>
			
			<div id="DQ" class="layui-fluid layui-form layui-form-pane">
				<div class="layui-form-item">
					<label class="layui-form-label">账号</label>
					<div class="layui-input-inline">
						<input type="text" name="username" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" id="zhanghao" readonly="true">
					</div>
				</div>
				
				<div class="layui-form-item">
					<label class="layui-form-label">密码</label>
					<div class="layui-input-inline">
						<input type="password" name="password"  placeholder="" class="layui-input pwd" id="password"  lay-verify="oldPaypwd" >
					</div>
						<a  href="changepassword.html" >
							修改密码
						 </a>
					
				</div>
		
				<div class="layui-form-item">
					<label class="layui-form-label">微信</label>
					<div class="layui-input-inline">
						<input type="text" name="password" id="wx" readonly="true" autocomplete="off" class="layui-input">
					</div>
				</div>
				  
				<div class="layui-form-item">
					<label class="layui-form-label">QQ</label>
					<div class="layui-input-inline">
					  <input type="text" name="password" id="qq" readonly="true" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">现有佣金</label>
					<div class="layui-input-inline">
					  <input type="text" name="password" id="money" readonly="true" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">已提现</label>
					<div class="layui-input-inline">
						<input type="text" name="password" id="tixian_money" readonly="true" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-col-sm7">
				
			</div>
			
			<button data-method="offset" data-type="auto" class="layui-btn layui-btn-normal" id="xiugai">修改</button>
		</fieldset>
		
    </div>
	
  </div>
  
  <div class="layui-footer" id="bottom">
    
  </div>
</div>
<script type="text/javascript" src="../javascript/jquery.min.js"></script>
<script type="text/javascript" src="../layui/layui.js"></script>
<script type="text/javascript" src="../icheck/icheck.js"></script>
<script type="text/javascript" src="../javascript/dw.js"></script>

<script>
	layui.use(['form','layer','jquery'],function(){
		var form = layui.form,
			layer = parent.layer === undefined ? layui.layer : top.layer
			$ = layui.jquery;
			$("#bottom").load("bottom.html");
			console.log(localStorage.login_font_name);
			if(!localStorage.login_font_name||localStorage.login_font_name==''){
			//layer.msg("您还未登录，请先登录后操作")
			layer.msg("您还未登录前往登录");
				setTimeout(function(){
					window.location.href = "http://127.0.0.1:89/font/login.html";
					
				},2000);
			}else{
				console.log(localStorage.login_font_name);
				//$("#user_name").append(localStorage.login_name);
				$("#username").append(localStorage.login_font_name);
				$("#yongjin").append(localStorage.login_font_yongjin);
			}
			
			$.ajax({ //结束时间
				type: 'POST',
				url: "http://127.0.0.1:88/index.php/font/Font/getpersonalinformation",
				dataType: "json",
				data: "user_name="+localStorage.login_font_name,
				success: function(sss) {
					console.log(sss);
					console.log(sss['data'][0]['user_name']);
					$("#zhanghao").val(sss['data'][0]['user_name']);
					$("#wx").val(sss['data'][0]['user_wx']);
					$("#qq").val(sss['data'][0]['user_qq']);
					$("#money").val(sss['data'][0]['font_money']);
					$("#tixian_money").val(sss['data'][0]['tixian_money']);
					console.log($("#tixian_money").val());
					
				}
			});
		
		
		$("#xiugai").click(function() {
			var kaichuang=layer.open({
				type: 1,
				closeBtn: 0,
				content: '<div align="center"><big><div class="layui-col-md10">'+
							'<label class="layui-form-label">qq:</label>'+
							'<div class="layui-input-block">'+
								'<input class="layui-input" id="xgqq" type="text" value="'+$("#qq").val()+'"/>'+
							'</div>'+
							'<label class="layui-form-label">微信:</label>'+
							'<div class="layui-input-block">'+
								'<input class="layui-input" id="qgwx" type="text" value="'+$("#wx").val()+'"/>'+
							'</div>'+
						'</div></big></div>',
				btn: ['取消', '确认'],
				yes: function() {
					$("#password").val('');
					layer.close(kaichuang);
					//layer.msg("取消被按下了");
					return true;
				},
				btn2: function() {
					$.ajax({ //结束时间
				type: 'POST',
				url: "http://127.0.0.1:88/index.php/font/Font/xiugaitijiao",
				dataType: "json",
				data: "qq="+$("#xgqq").val()+"&wx="+$("#xgwx").val()+"&user_name="+localStorage.login_font_name,
				success: function(sss) {
					console.log(sss);
					
				}
			});
					layer.close(kaichuang);
					
					return false;
				}
			}); 
		})
	})

</script>

</body>
</html>